z = net.forward(x)  
gradient_w = (z - y) * x  
print('gradient_w shape {}'.format(gradient_w.shape)) 
print(gradient_w) 
